package com.smalljj.activity;

import com.smalljj.comm.ActivityStackControlUtil;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.ProgressBar;

public class LoginActivity extends Activity {

	private ProgressBar progressBar;
	private Button backButton;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);// 去除标题
		setContentView(R.layout.login);
		ActivityStackControlUtil.add(this);
		
		progressBar = (ProgressBar) findViewById(R.id.pgBar);
		backButton = (Button) findViewById(R.id.btn_back);
		progressBar.setMax(3000);

		Intent intent = new Intent(this, MainActivity.class);
		LoginActivity.this.startActivity(intent);

		backButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				finish();
			}
		});
	}
	
	@Override
	protected void onDestroy() { 
        super.onDestroy(); 
        //移出管理栈
        ActivityStackControlUtil.remove(this); 
	} 
}